package com.data.JVM.chapter10;
/**
 * 自动装箱，拆箱的语法糖
 */
public class Sugar {
    public static void main(String[] args) {
        Integer a = 1;
        Integer b = 2;
        Integer c = 3;
        Integer d = 3;
        Integer e = 321;
        Integer f = 321;

        Long g = 3L;

        System.out.println(c==d);
        //没有遇到计算Integer不会拆箱，这里的e和f是两个对象
        System.out.println(e==f);
        System.out.println(c ==(a+b));
        System.out.println(c.equals(a+b));
        System.out.println(g==(a+b));
        System.out.println(g.equals(a+b));
    }
}
